package com.ruoyi.sale.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sale.mapper.MallHomeAdvertiseMapper;
import com.ruoyi.sale.domain.MallHomeAdvertise;
import com.ruoyi.sale.service.IMallHomeAdvertiseService;

/**
 * 首页轮播广告Service业务层处理
 * 
 * @author cws
 * @date 2024-11-18
 */
@Service
public class MallHomeAdvertiseServiceImpl implements IMallHomeAdvertiseService 
{
    @Autowired
    private MallHomeAdvertiseMapper mallHomeAdvertiseMapper;

    /**
     * 查询首页轮播广告
     * 
     * @param id 首页轮播广告主键
     * @return 首页轮播广告
     */
    @Override
    public MallHomeAdvertise selectMallHomeAdvertiseById(Long id)
    {
        return mallHomeAdvertiseMapper.selectMallHomeAdvertiseById(id);
    }

    /**
     * 查询首页轮播广告列表
     * 
     * @param mallHomeAdvertise 首页轮播广告
     * @return 首页轮播广告
     */
    @Override
    public List<MallHomeAdvertise> selectMallHomeAdvertiseList(MallHomeAdvertise mallHomeAdvertise)
    {
        return mallHomeAdvertiseMapper.selectMallHomeAdvertiseList(mallHomeAdvertise);
    }

    /**
     * 新增首页轮播广告
     * 
     * @param mallHomeAdvertise 首页轮播广告
     * @return 结果
     */
    @Override
    public int insertMallHomeAdvertise(MallHomeAdvertise mallHomeAdvertise)
    {
        return mallHomeAdvertiseMapper.insertMallHomeAdvertise(mallHomeAdvertise);
    }

    /**
     * 修改首页轮播广告
     * 
     * @param mallHomeAdvertise 首页轮播广告
     * @return 结果
     */
    @Override
    public int updateMallHomeAdvertise(MallHomeAdvertise mallHomeAdvertise)
    {
        return mallHomeAdvertiseMapper.updateMallHomeAdvertise(mallHomeAdvertise);
    }

    /**
     * 批量删除首页轮播广告
     * 
     * @param ids 需要删除的首页轮播广告主键
     * @return 结果
     */
    @Override
    public int deleteMallHomeAdvertiseByIds(Long[] ids)
    {
        return mallHomeAdvertiseMapper.deleteMallHomeAdvertiseByIds(ids);
    }

    /**
     * 删除首页轮播广告信息
     * 
     * @param id 首页轮播广告主键
     * @return 结果
     */
    @Override
    public int deleteMallHomeAdvertiseById(Long id)
    {
        return mallHomeAdvertiseMapper.deleteMallHomeAdvertiseById(id);
    }
}
